﻿using UnityEngine;
using System.Collections;
namespace GameEditor
{
    public class MapEditorMenuBar : BaseWidget
    {
        public GameObject SaveMenuItem;
        public MapEditorScene CurScene;

        public System.Action SaveItemEvent;
        public override void OnLoad()
        {
            UIEventListener.Get(SaveMenuItem).onClick += OnClickSaveItem;
            CurScene = GameEditor.Scene.Cur<MapEditorScene>(); 
        }

        void OnClickSaveItem(GameObject go)
        {
            if (SaveItemEvent != null)
            {
                SaveItemEvent();
            }
        }
    }
}